<?php
class All_js {

  function All_js()
  {
    $this->CI =& get_instance();
  }
  function addJS($value){
		$FILE_PATH=FILE_PATH;
		$BASE_URL=BASE_URL;
		$CONTROLLER=$this->CI->router->fetch_class();
		$METHOD=$this->CI->router->fetch_method();
    $datajs="";
    if($value=="numeric"){
      $datajs.= "<script type=\"text/javascript\" src=\"{$FILE_PATH}js/numeric.js\"></script> \n";
    }
    if($value=="jquery.typing"){
      $datajs= "<script type=\"text/javascript\" src=\"{$FILE_PATH}js/jquery.typing-0.2.0.min.js\"></script> \n";
      $datajs.= "<script type=\"text/javascript\" src=\"{$FILE_PATH}js/module/shared/search_typing.js\"></script> \n";
    }
    if($value=="variable"){
      $datajs= "<script type=\"text/javascript\">CONTROLLER='$CONTROLLER';METHOD='$METHOD';BASE_URL = '{$BASE_URL}';</script> \n";
    }
		if($value=="jquery"){
			$datajs= "<script type=\"text/javascript\" src=\"{$FILE_PATH}js/jquery-1.8.1.min.js\"></script> \n";	
		}
		if($value=="bootstrap"){
			$datajs= "<script type=\"text/javascript\" src=\"{$FILE_PATH}js/bootstrap.min.js\"></script> \n";	
    }
		if($value=="bootstrap-modal"){
			$datajs= "<script type=\"text/javascript\" src=\"{$FILE_PATH}js/bootstrap-modal.js\"></script> \n";	
    }
    if($value=="ajaxupload"){
			$datajs= "<script type=\"text/javascript\" src=\"{$FILE_PATH}upload/ajaxfileupload.js\"></script> \n";	
    }
    if($value=="validation"){
			$datajs= "<script type=\"text/javascript\" src=\"{$FILE_PATH}js/jquery.validate.js\"></script> \n";	
    }
    if($value=="notification"){
			$datajs="<script type=\"text/javascript\" src=\"{$FILE_PATH}noty/jquery.noty.js\"></script> \n";
			$datajs.="<script type=\"text/javascript\" src=\"{$FILE_PATH}noty/layouts/bottomCenter.js\"></script> \n";
			$datajs.="<script type=\"text/javascript\" src=\"{$FILE_PATH}noty/layouts/center.js\"></script> \n";
			$datajs.="<script type=\"text/javascript\" src=\"{$FILE_PATH}noty/themes/default.js\"></script> \n";
			$datajs.="<script type=\"text/javascript\" src=\"{$FILE_PATH}js/module/shared/notification.js\"></script> \n";
    }
    if($value=="datepicker"){
			$datajs="<script type=\"text/javascript\" src=\"{$FILE_PATH}datepicker/jquery.ui.core.js\"></script> \n";
			$datajs.="<script type=\"text/javascript\" src=\"{$FILE_PATH}datepicker/jquery.ui.widget.js\"></script> \n";
			$datajs.="<script type=\"text/javascript\" src=\"{$FILE_PATH}datepicker/jquery.ui.datepicker.js\"></script> \n";
			$datajs.="<script type=\"text/javascript\" src=\"{$FILE_PATH}js/bootstrap-timepicker.min.js\"></script> \n";
			
    }
    if($value=="treemenu"){
      $datajs="<script type=\"text/javascript\" src=\"{$FILE_PATH}tree_menu/jquery.ui.mouse.js\"></script> \n";
			$datajs.="<script type=\"text/javascript\" src=\"{$FILE_PATH}tree_menu/jquery.ui.resizable.js\"></script> \n";
    }
    if($value=="template"){
      $datajs.="<script type=\"text/javascript\" src=\"{$FILE_PATH}js/module/template.js\"></script> \n";
    }
    return $datajs;
  }
}
